<?php

	#	Handles all calls to helper function from inside a view.

	class Helper
	{
		public $Route;
		
		# temporary class instance
		private $temp;
		
		public function __construct()
		{
			global $_ROUTE;
			$this->Route = $_ROUTE;
			# do nothing!
		}
		
		public function __call ( $func, $params )
		{
			include APPLICATION_PATH.$this->Route->folder.'/view/helpers/'.$func.'.helper.php';
			
			$this->temp = new $func;
			return $this->temp->$func( implode(',', $params ) );			
		}
	}
?>